<template>
	<view class="wxn-grid" >
			<slot></slot>
	</view>
</template>

<script>
	export default {
		name: "wxn-grid",
		props: {
			col: {
				type: [Number, String],
				default: 3
			},
			
		},
		watch: {
			col(newValue, oldValue) {
				this.children.map(child=>{
					child.getParentData('wxn-grid')
				})
				
			},
			immdeiate:true
		},
		data() {
			return {
				ui:'jjj'
			};
		},
		created() {
			this.children = [];
		},
		methods:{
			tap(item){
				// console.log('点击事件：'+item)
				this.$emit('click',item)
			}
		}
	}
</script>

<style scoped lang="scss">
	.wxn-grid {
		/* #ifndef MP */
		width: 100%;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		/* #endif */
		// display: flex;
		/* #ifdef MP */
		position: relative;
		box-sizing: border-box;
		overflow: hidden;
		/* #endif */
	}
</style>
